#ifndef OBJECT_H_
#define OBJECT_H_

#include <string>

typedef int Coord;

class Point
{
public:
	Point() {}

	Point(const Coord& x, const Coord& y)
	{
		this->x = x;
		this->y = y;
	}

public:
	Coord x;
	Coord y;
};

class Shape
{
public:
	//Shape(){}; // don't declare construct for virtual class

public:
	virtual void getBoundPoint(
		Point& bottomLeft, Point& topRight) = 0;
	virtual void setBoundPoint(
		const Point& bottomLeft, const Point& topRight) = 0;

	virtual bool isEmpty() = 0;
};

class TextView
{
public:
	TextView() {}

public:
	virtual void getOrigin(Point& origin)
	{
		origin = m_origin;
	}

	virtual void setOrigin(const Point& origin)
	{
		m_origin = origin;
	}

	virtual void getExtent(Coord& width, Coord& height)
	{
		width = m_width;
		height = m_height;
	}

	virtual void setExtent(
		const Coord& width, const Coord& height)
	{
		m_width = width;
		m_height = height;
	}

	virtual void getText(std::string& str)
	{
		str = m_sText;
	}

	virtual void setText(const std::string& str)
	{
		m_sText = str;
	}

	virtual bool isEmpty()
	{
		return m_sText.empty();
	}

private:
	std::string m_sText;
	Point m_origin;
	Coord m_width;
	Coord m_height;
};

#endif // OBJECT_H_
